package org.yzh.protocol.commons.transform.attribute;

import io.github.yezhihao.protostar.DataType;
import io.github.yezhihao.protostar.annotation.Field;
import org.yzh.protocol.commons.transform.Attribute;
import org.yzh.protocol.jsatl12.AlarmId;
import org.yzh.protocol.jsatl12.AlarmIdMultimedia;

import java.time.LocalDateTime;
import java.util.List;

/**
 * @author lsj
 * @date 2021/1/6 20:13
 */
public class AlarmFM extends Attribute {
    public static final int attributeId = 0xE1;

    private long serialNo;
    private int type;
    private int level;
    private int frontSpeed;
    private int frontDistance;
    private int roadSign;
    private int roadSignValue;
    private int alarmIdMultimediaCount;
    private List<AlarmIdMultimedia> alarmIdMultimediaList;

    @Override
    public int getAttributeId() {
        return attributeId;
    }

    @Field(index = 0, type = DataType.DWORD, desc = "报警ID")
    public long getSerialNo() {
        return serialNo;
    }

    public void setSerialNo(long serialNo) {
        this.serialNo = serialNo;
    }

    @Field(index = 4, type = DataType.DWORD, desc = "报警/事件类型")
    public int getType() {
        return type;
    }

    public void setType(int type) {
        this.type = type;
    }

    @Field(index = 8, type = DataType.BYTE, desc = "报警级别")
    public int getLevel() {
        return level;
    }

    public void setLevel(int level) {
        this.level = level;
    }

    @Field(index = 9, type = DataType.BYTE, desc = "前车车速")
    public int getFrontSpeed() {
        return frontSpeed;
    }

    public void setFrontSpeed(int frontSpeed) {
        this.frontSpeed = frontSpeed;
    }

    @Field(index = 10, type = DataType.BYTE, desc = "前车/行人距离")
    public int getFrontDistance() {
        return frontDistance;
    }

    public void setFrontDistance(int frontDistance) {
        this.frontDistance = frontDistance;
    }


    @Field(index = 11, type = DataType.BYTE, desc = "道路标志识别类型")
    public int getRoadSign() {
        return roadSign;
    }

    public void setRoadSign(int roadSign) {
        this.roadSign = roadSign;
    }

    @Field(index = 12, type = DataType.BYTE, desc = "道路标志识别数据")
    public int getRoadSignValue() {
        return roadSignValue;
    }

    public void setRoadSignValue(int roadSignValue) {
        this.roadSignValue = roadSignValue;
    }

    @Field(index = 13, type = DataType.BYTE, desc = "报警标识多媒体列表总数")
    public int getAlarmIdMultimediaCount() {
        return alarmIdMultimediaCount;
    }

    public void setAlarmIdMultimediaCount(int alarmIdMultimediaCount) {
        this.alarmIdMultimediaCount = alarmIdMultimediaCount;
    }

    @Field(index = 14, type = DataType.LIST, desc = "报警标识多媒体")
    public List<AlarmIdMultimedia> getAlarmIdMultimediaList() {
        return alarmIdMultimediaList;
    }

    public void setAlarmIdMultimediaList(List<AlarmIdMultimedia> alarmIdMultimediaList) {
        this.alarmIdMultimediaList = alarmIdMultimediaList;
    }
}
